SPB Git forge
38commits 1branches 0releases
338.7 MBsize
maindefault branch
6 h agolast push
HTML 53.9% TypeScript 44.5% JavaScript 0.6% SQL 0.5%
383 B · 7 lines typescript
Raw Blame History
1import type { MetroDetail } from "@dci/core";2import { cache } from "react";3import { api, type ApiResult } from "@/lib/api";45/** Per-request memoised metro loader shared by layout (existence gate), metadata, page and OG image. */6export const getMetro = cache(async (slug: string, fPage = 1): Promise<ApiResult<MetroDetail>> => api.metro(slug, fPage > 1 ? { fPage } : undefined));7